.class Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;
.super Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;
.source "ImageHolder.java"


# instance fields
.field protected k:Landroid/widget/ImageView;

.field protected l:Landroid/widget/TextView;

.field private m:Z


# direct methods
.method public constructor <init>(Landroid/view/View;)V
    .locals 1

    .line 1
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;-><init>(Landroid/view/View;)V

    .line 2
    sget v0, Les/x4;->iv_photo:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->k:Landroid/widget/ImageView;

    .line 3
    sget v0, Les/x4;->v_selected:I

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    iput-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    .line 4
    invoke-virtual {p1, p0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method


# virtual methods
.method public a(Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;I)V
    .locals 3

    .line 1
    invoke-super {p0, p1, p2}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->a(Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;I)V

    .line 2
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->c:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->b:Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;

    invoke-virtual {p2, v0}, Lcom/esfile/screen/recorder/picture/picker/adapter/SelectableAdapter;->b(Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;)Z

    move-result p2

    iput-boolean p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->m:Z

    if-eqz p2, :cond_0

    .line 3
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->c:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->b:Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;

    invoke-virtual {p2, v0}, Lcom/esfile/screen/recorder/picture/picker/adapter/SelectableAdapter;->a(Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;)I

    move-result p2

    .line 4
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    add-int/lit8 p2, p2, 0x1

    invoke-static {p2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 5
    :cond_0
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    const-string v0, ""

    invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 6
    :goto_0
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    iget-boolean v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->m:Z

    invoke-virtual {p2, v0}, Landroid/widget/TextView;->setSelected(Z)V

    .line 7
    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->k:Landroid/widget/ImageView;

    iget-boolean v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->m:Z

    invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setSelected(Z)V

    .line 8
    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;->c()Ljava/lang/String;

    move-result-object p1

    .line 9
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p2

    if-nez p2, :cond_1

    .line 10
    new-instance p2, Lcom/bumptech/glide/request/e;

    invoke-direct {p2}, Lcom/bumptech/glide/request/e;-><init>()V

    invoke-virtual {p2}, Lcom/bumptech/glide/request/a;->c()Lcom/bumptech/glide/request/a;

    move-result-object p2

    check-cast p2, Lcom/bumptech/glide/request/e;

    iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;

    .line 11
    invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Les/v4;->durec_picker_video_item_width:I

    .line 12
    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v0

    iget-object v1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;

    .line 13
    invoke-virtual {v1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Les/v4;->durec_picker_video_item_width:I

    .line 14
    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v1

    .line 15
    invoke-virtual {p2, v0, v1}, Lcom/bumptech/glide/request/a;->a(II)Lcom/bumptech/glide/request/a;

    move-result-object p2

    check-cast p2, Lcom/bumptech/glide/request/e;

    sget v0, Les/w4;->durec_picker_image_placeholder:I

    .line 16
    invoke-virtual {p2, v0}, Lcom/bumptech/glide/request/a;->b(I)Lcom/bumptech/glide/request/a;

    move-result-object p2

    check-cast p2, Lcom/bumptech/glide/request/e;

    sget v0, Les/w4;->durec_picker_image_placeholder:I

    .line 17
    invoke-virtual {p2, v0}, Lcom/bumptech/glide/request/a;->a(I)Lcom/bumptech/glide/request/a;

    move-result-object p2

    check-cast p2, Lcom/bumptech/glide/request/e;

    .line 18
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->j:Lcom/bumptech/glide/h;

    .line 19
    invoke-virtual {v0, p1}, Lcom/bumptech/glide/h;->a(Ljava/lang/String;)Lcom/bumptech/glide/g;

    move-result-object p1

    .line 20
    invoke-virtual {p1, p2}, Lcom/bumptech/glide/g;->a(Lcom/bumptech/glide/request/a;)Lcom/bumptech/glide/g;

    move-result-object p1

    iget-object p2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->k:Landroid/widget/ImageView;

    .line 21
    invoke-virtual {p1, p2}, Lcom/bumptech/glide/g;->a(Landroid/widget/ImageView;)Les/w3;

    :cond_1
    return-void
.end method

.method public d()V
    .locals 2

    .line 1
    iget-boolean v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->d:Z

    if-eqz v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_0
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3

    .line 1
    invoke-super {p0, p1}, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->onClick(Landroid/view/View;)V

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->l:Landroid/widget/TextView;

    if-ne p1, v0, :cond_1

    const/4 p1, 0x1

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->i:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter$b;

    if-eqz v0, :cond_0

    .line 4
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->b:Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;

    invoke-virtual {p1}, Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;->c()Ljava/lang/String;

    move-result-object p1

    iget-boolean v1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/c;->m:Z

    iget-object v2, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->c:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter;

    .line 5
    invoke-virtual {v2}, Lcom/esfile/screen/recorder/picture/picker/adapter/SelectableAdapter;->e()Ljava/util/List;

    move-result-object v2

    .line 6
    invoke-interface {v0, p1, v1, v2}, Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter$b;->a(Ljava/lang/String;ZLjava/util/List;)Z

    move-result p1

    :cond_0
    if-eqz p1, :cond_1

    .line 7
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->c:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter;

    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->b:Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;

    invoke-virtual {p1, v0}, Lcom/esfile/screen/recorder/picture/picker/adapter/SelectableAdapter;->c(Lcom/esfile/screen/recorder/picture/picker/entity/MediaItem;)V

    .line 8
    iget-object p1, p0, Lcom/esfile/screen/recorder/picture/picker/adapter/holder/MediaViewHolder;->c:Lcom/esfile/screen/recorder/picture/picker/adapter/MediaPickerAdapter;

    invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyDataSetChanged()V

    :cond_1
    return-void
.end method
